/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 * Description: fsl Vendor Macro
 */

#ifndef __HW_FSL_IO_H
#define __HW_FSL_IO_H

#define mutiobj_driver(__driver_name, __driver, __register, __unregister, ...) \
int __init __driver##_init(void) \
{ \
	__driver.driver.name = __driver_name; \
	return __register(&(__driver), ##__VA_ARGS__); \
} \
extern int __init __driver##_init(void); \
void __exit __driver##_exit(void) \
{ \
	__unregister(&(__driver), ##__VA_ARGS__); \
} \
extern void __exit __driver##_exit(void)

#define mutiobj_init(__driver) \
void __init __driver##_init(void) \
{ \
	__driver(); \
} \
extern void __init __driver##_init(void)

#define mutiobj_exit(__driver) \
void __exit __driver##_exit(void) \
{ \
	__driver(); \
} \
extern void __exit __driver##_exit(void)
#endif
